package view;

import java.util.ArrayList;
import java.util.List;

import model.Contract;
import model.User;
import Repository.Repository;
import Repository.RepositoryFactory;
import constants.SMSConstants;

public class DefaultView extends View {

	
	public DefaultView(User user){
		super(user);
	}
	
	@Override
	void retrieveView() {
		Repository repository = RepositoryFactory.getRepository(SMSConstants.CONTRACT);
		
		List lstContracts = repository.retrieve("Prepared");
		contractObjects.clear();
		for(Object o : lstContracts){
			Contract contract = (Contract)o;
			if(contract.getNextApprover() == user.getId()){
				contractObjects.add(contract);
			}
		}
		
		
		// TODO Auto-generated method stub

	}

}
